import java.util.Scanner;

public class demo02 {
    //字符串转成整数
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        System.out.println(StrToInt(str));
    }
    public static int StrToInt(String str) {
        char[] arr=str.toCharArray();
        if(arr.length==0){
            return 0;
        }
        int sum=0;
        int flag=1;
        if(arr[0]=='-'){
            flag=-1;
            arr[0]='0';
        }else if (arr[0] == '+'){
            flag=1;
            arr[0]='0';
        }
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] < '0' || arr[i] > '9') {
                sum = 0;
                break;
            }
            sum =sum*10+ (arr[i] - '0');
        }
        return flag*sum;
    }
}
